import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
const routes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/Login/index.vue")
  },
  {
    path: "/",
    name: "Home",
    redirect: "/exhibition/siteOverview/index",
    component: () => import("@/views/Home/index.vue"),
    children: [
      {
        path: "/exhibition/siteOverview/index",
        name: "SiteOverview",
        component: () => import("@/views/Exhibition/SiteOverview/index.vue"),
        meta: { title: "站点概览" }
      },
      {
        path: "/monitor/realTimeOperation/index",
        name: "RealTimeOperation",
        component: () => import("@/views/Monitor/RealTimeOperation/index.vue"),
        meta: { title: "实时运行" }
      },
      {
        path: "/monitor/centralizedControlManagement/index",
        name: "CentralizedControlManagement",
        component: () => import("@/views/Monitor/CentralizedControlManagement/index.vue"),
        meta: { title: "集控管理" }
      },
      {
        path: "/alarm/realTimeAlarm/index",
        name: "RealTimeAlarm",
        component: () => import("@/views/Alarm/RealTimeAlarm/index.vue"),
        meta: { title: "实时报警" }
      },
      {
        path: "/alarm/alarmStatistics/index",
        name: "AlarmStatistics",
        component: () => import("@/views/Alarm/AlarmStatistics/index.vue"),
        meta: { title: "报警统计" }
      },
      {
        path: "/analysis/curveReport",
        name: "CurveReport",
        component: () => import("@/views/Analysis/CurveReport/home.vue"),
        meta: { title: "曲线报表" },
        children: [
          {
            path: "incomeReport",
            name: "IncomeReport",
            component: () => import("@/views/Analysis/CurveReport/component/IncomeReport.vue"),
            meta: { title: "收益报表" }
          },
          {
            path: "electricityReport",
            name: "ElectricityReport",
            component: () => import("@/views/Analysis/CurveReport/component/ElectricityReport.vue"),
            meta: { title: "电量报表" }
          },
          {
            path: "meterReport",
            name: "MeterReport",
            component: () => import("@/views/Analysis/CurveReport/component/MeterReport.vue"),
            meta: { title: "电表报表" }
          },
          {
            path: "powerCurve",
            name: "PowerCurve",
            component: () => import("@/views/Analysis/CurveReport/component/PowerCurve.vue"),
            meta: { title: "功率曲线" }
          },
          {
            path: "pcsCurve",
            name: "PcsCurve",
            component: () => import("@/views/Analysis/CurveReport/component/PcsCurve.vue"),
            meta: { title: "PCS曲线" }
          },
          {
            path: "batteryStackCurve",
            name: "BatteryStackCurve",
            component: () => import("@/views/Analysis/CurveReport/component/BatteryStackCurve.vue"),
            meta: { title: "电池堆曲线" }
          },
          {
            path: "singleCurve",
            name: "SingleCurve",
            component: () => import("@/views/Analysis/CurveReport/component/SingleCurve.vue"),
            meta: { title: "单体曲线" }
          },
          {
            path: "batteryTemperatureReport",
            name: "BatteryTemperatureReport",
            component: () => import("@/views/Analysis/CurveReport/component/BatteryTemperatureReport.vue"),
            meta: { title: "电池温度报表" }
          },
          {
            path: "batteryVoltageReport",
            name: "BatteryVoltageReport",
            component: () => import("@/views/Analysis/CurveReport/component/BatteryVoltageReport.vue"),
            meta: { title: "电池电压报表" }
          },
          {
            path: "exportList",
            name: "ExportList",
            component: () => import("@/views/Analysis/CurveReport/component/ExportList.vue"),
            meta: { title: "导出列表" }
          }
        ]
      },
      {
        path: "/analysis/batteryAnalysis/index",
        name: "BatteryAnalysis",
        component: () => import("@/views/Analysis/BatteryAnalysis/index.vue"),
        meta: { title: "电池分析" }
      },
      {
        path: "/analysis/laggingBatteryReport/index",
        name: "LaggingBatteryReport",
        component: () => import("@/views/Analysis/LaggingBatteryReport/index.vue"),
        meta: { title: "落后电池报表" }
      },
      {
        path: "/management/systemSettings/index",
        name: "SystemSettings",
        component: () => import("@/views/Management/SystemSettings/index.vue"),
        meta: { title: "系统设置" }
      },
      {
        path: "/management/strategyManagement/index",
        name: "StrategyManagement",
        component: () => import("@/views/Management/StrategyManagement/index.vue"),
        meta: { title: "策略管理" }
      },
      {
        path: "/management/personnelManagement/index",
        name: "PersonnelManagement",
        component: () => import("@/views/Management/PersonnelManagement/index.vue"),
        meta: { title: "人员管理" }
      },
      {
        path: "/operation/index",
        name: "Operation",
        component: () => import("@/views/Operation/index.vue"),
        meta: { title: "运维中心" }
      }
    ]
  },
  {
    path: "/exhibition/dataScreen/index",
    name: "DataScreen",
    component: () => import("@/views/Exhibition/DataScreen/index.vue"),
    meta: { title: "数据大屏" }
  },
  {
    path: "/monitor/singleStationMonitoring/home",
    name: "SingleStationMonitoring",
    redirect: "/monitor/singleStationMonitoring/index",
    component: () => import("@/views/Monitor/SingleStationMonitoring/home.vue"),
    children: [
      {
        path: "/monitor/singleStationMonitoring/index",
        name: "SingleStationIndex",
        component: () => import("@/views/Monitor/SingleStationMonitoring/index.vue"),
        meta: { title: "单站监控" }
      },
      {
        path: "/monitor/singleStationMonitoring/wiringDiagram",
        name: "SingleStationWiringDiagram",
        component: () => import("@/views/Monitor/SingleStationMonitoring/wiringDiagram.vue"),
        meta: { title: "主接线图" }
      },
      {
        path: "/monitor/singleStationMonitoring/equipmentMonitoring",
        name: "SingleStationEquipmentMonitoring",
        component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoringHome.vue"),
        meta: { title: "设备监控" },
        children: [
          {
            path: "realtime",
            name: "EquipmentRealtime",
            component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoring/Realtime.vue"),
            meta: { title: "实时运行" }
          },
          {
            path: "pcs",
            name: "EquipmentPCS",
            component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoring/PCS.vue"),
            meta: { title: "PCS" }
          },
          {
            path: "bms",
            name: "EquipmentBMS",
            component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoring/BMS.vue"),
            meta: { title: "BMS" }
          },
          {
            path: "battery",
            name: "EquipmentBattery",
            component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoring/Battery.vue"),
            meta: { title: "单体电池" }
          },
          {
            path: "meter",
            name: "EquipmentMeter",
            component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoring/Meter.vue"),
            meta: { title: "电表" }
          },
          {
            path: "aircon",
            name: "EquipmentAircon",
            component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoring/Aircon.vue"),
            meta: { title: "空调" }
          },
          {
            path: "fire",
            name: "EquipmentFire",
            component: () => import("@/views/Monitor/SingleStationMonitoring/equipmentMonitoring/Fire.vue"),
            meta: { title: "消防设备" }
          }
        ]
      },
      {
        path: "/monitor/singleStationMonitoring/faultAlarm",
        name: "SingleStationFaultAlarm",
        component: () => import("@/views/Monitor/SingleStationMonitoring/faultAlarm.vue"),
        meta: { title: "故障报警" }
      }
    ]
  },
];
const router = createRouter({
  scrollBehavior() {
    return { top: 0 };
  },
  history: createWebHashHistory(),
  routes,
});

export default router;
